package com.hanson.basicknowledge.AOPdemo;

import com.hanson.basicknowledge.AOPdemo.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Hanson
 * @date 2023/2/24 12:31
 */
public class App {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
        UserService userService = context.getBean(UserService.class);
        //userService.getUser("1");
        User user = new User();
        user.setAge("2");
        user.setName("Bob");
        userService.saveUser(user);
        context.close();
    }
}
